import { Api } from "@/map/point/index";

const { GetMemberPointChangeMap: GMPCM, GetMultipleChangeListMap: M } = Api;

export interface MultipleChangeList {
  request: {};
  response: {
    [M.RecordId]: string;
    [M.RecordTitle]: string;
    [M.PointType]: {
      [M.PointTypeId]: string | number;
      [M.PointTypeName]: string;
    };
    [M.NumberOfPeople]: number;
    [M.Operator]: {
      [M.OperatorId]: string;
      [M.OperatorNo]: string;
      [M.OperatorName]: string;
      [M.OperatorGender]: string;
      [M.OperatorAvatar]: string;
      [M.OperatorTel]: string;
      [M.OperatorClass]: string;
      [M.OperatorRole]: {
        [M.OperatorRoleId]: string | number;
        [M.OperatorRoleName]: string;
      };
    };
    [M.CreateTime]: string;
    [M.Status]: number;
  };
}

// delete
export interface GetMultipleChangeListRes {
  [M.RecordId]: string;
  [M.RecordTitle]: string;
  [M.PointType]: {
    [M.PointTypeId]: string | number;
    [M.PointTypeName]: string;
  };
  [M.NumberOfPeople]: number;
  [M.Operator]: {
    [M.OperatorId]: string;
    [M.OperatorNo]: string;
    [M.OperatorName]: string;
    [M.OperatorGender]: string;
    [M.OperatorAvatar]: string;
    [M.OperatorTel]: string;
    [M.OperatorClass]: string;
    [M.OperatorRole]: {
      [M.OperatorRoleId]: string | number;
      [M.OperatorRoleName]: string;
    };
  };
  [M.CreateTime]: string;
  [M.Status]: number;
}

export interface MemberPointChange {
  request: {
    [GMPCM.UserNo]: string;
    [GMPCM.UserName]: string;
  };
  response: {
    [GMPCM.UserId]: string;
    [GMPCM.UserNo]: string;
    [GMPCM.UserName]: string;
    [GMPCM.UserTel]: string;
    [GMPCM.UserClass]: string;
    [GMPCM.UserPoints]: {
      [GMPCM.PointTypeId]: number | string;
      [GMPCM.PointTypeName]: string;
      [GMPCM.PointTypeValue]: number;
    }[];
    [GMPCM.UserTotalPoint]: number;
    [GMPCM.UserRecords]: {
      [GMPCM.ChangeTime]: string;
      [GMPCM.ChangeType]: {
        [GMPCM.ChangeTypeId]: number | string;
        [GMPCM.ChangeTypeText]: string;
      };
      [GMPCM.ChangePoint]: number;
      [GMPCM.PointType]: {
        [GMPCM.PointTypeId]: number | string;
        [GMPCM.PointTypeName]: string;
      };
      [GMPCM.OperaterId]: {
        [GMPCM.OperaterId]: string;
        [GMPCM.OperaterName]: string;
      };
    }[];
  };
}

// delete
export interface GetMemberPointChangeRequest {
  [GMPCM.UserNo]: string;
  [GMPCM.UserName]: string;
}

// delete
export interface GetMemberPointChangeResponse {
  [GMPCM.UserId]: string;
  [GMPCM.UserNo]: string;
  [GMPCM.UserName]: string;
  [GMPCM.UserTel]: string;
  [GMPCM.UserClass]: string;
  [GMPCM.UserPoints]: {
    [GMPCM.PointTypeId]: number | string;
    [GMPCM.PointTypeName]: string;
    [GMPCM.PointTypeValue]: number;
  }[];
  [GMPCM.UserTotalPoint]: number;
  [GMPCM.UserRecords]: {
    [GMPCM.ChangeTime]: string;
    [GMPCM.ChangeType]: {
      [GMPCM.ChangeTypeId]: number | string;
      [GMPCM.ChangeTypeText]: string;
    };
    [GMPCM.ChangePoint]: number;
    [GMPCM.PointType]: {
      [GMPCM.PointTypeId]: number | string;
      [GMPCM.PointTypeName]: string;
    };
    [GMPCM.OperaterId]: {
      [GMPCM.OperaterId]: string;
      [GMPCM.OperaterName]: string;
    };
  }[];
}
